package com.xbongbong.saas.enums.business;

import java.util.Objects;

public enum SwotIndexEnum {

    LETHAL_INDEX(0,"致命指标"),
    WINNING_INDEX(1,"优胜指标"),
    INVALID_INDEX(2,"无效指标"),
    SLUMBER_INDEX(3,"沉睡指标"),
    ;


    private Integer index;

    private String name;


    SwotIndexEnum(Integer index, String name){
        this.index = index;
        this.name = name;
    }

    public String getName(){
        return this.name;
    }

    public Integer getIndex(){
        return this.index;
    }

    public static SwotIndexEnum getByIndex(Integer index){
        SwotIndexEnum swotIndexEnum = null;
        for (SwotIndexEnum value : values()) {
            if (Objects.equals(index,value.getIndex())){
                swotIndexEnum = value;
            }
        }
        return swotIndexEnum;
    }
}
